package com.wangtianxiang.sxp.weixin.web;

import com.wangtianxiang.sxp.po.ActivityType;
import com.wangtianxiang.sxp.module.service.ActivityTypeService;
import com.wangtianxiang.sxp.common.http.FeedBackBody;
import com.wangtianxiang.sxp.common.http.ResponseEntity;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Slf4j
@RequestMapping("/api/activity/type")
@RestController
public class ActivityTypeController {

    @Autowired
    private ActivityTypeService activityTypeService;

    @GetMapping(value = "list")
    @ApiOperation(value = "列表")
    public FeedBackBody<List<ActivityType>> list(){
        return ResponseEntity.setForSuccess(activityTypeService.list());
    }
}
